package patterndesign.template;

import java.io.IOException;

/**
 * @Description
 * @Date 2021/9/15
 * @Created by Jonathan
 */
public class TemplateClient {
    public static void main(String[] args) throws IOException {
        System.out.println("H1悍马");
        HummerH1Model h1Model = new HummerH1Model();
        System.out.println("悍马是否需要喇叭？0-需要,1-不需要。");
        int read = System.in.read();
        if (read == 0) {
            h1Model.setAlarmFlag(true);
        }
        h1Model.run();
        System.out.println("H2悍马");
        HummerH2Model h2Model = new HummerH2Model();
        h2Model.run();
    }
}
